<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<form class="form-inline" action="" method="post">从
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${beginDate}" name="beginDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
  到
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${endDate}" name="endDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
  <input type="hidden" name="isFirst" value="1"/>
  <button type="submit" class="btn">查询</button>
</form>
<table class="table table-bordered">
  <thead>
    <tr>
      <th>类型</th>
      <th>产出K币</th>
      <th>回收K币</th>
    </tr>
  </thead>
  <tbody>
  <c:set var="goldOutAll" value="0"/>
  <c:set var="goldInAll" value="0"/>
  <c:forEach var="m" items="${detailList}">
    <tr>
      <td>${m.type}</td>
      <td>${m.systemGoldOut}</td>
      <c:set var="goldOutAll" value="${goldOutAll +  m.systemGoldOut}"/>
      <td>${m.systemGoldIn.goldIn}</td>
      <c:set var="goldInAll" value="${goldInAll +  m.systemGoldIn.goldIn}"/>
    </tr>
  </c:forEach>
   <tr>
      <td>合计</td>
      <td><c:out value="${goldOutAll}"/></td>
      <td><c:out value="${ goldInAll}"/></td>
    </tr>
  </tbody>
</table>

</body>
</html>